<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script>
        window.hdjs = {};
        window.hdjs.base = '/hdjs';
        window.hdjs.uploader = 'test/php/uploader.php?';
        window.hdjs.filesLists = 'test/php/filesLists.php?';
    </script>
    <script src="../dist/static/requirejs/require.js"></script>
    <script src="../dist/static/requirejs/config.js"></script>
</head>
<body style="padding: 50px;">
<input name="birthdate" value="10/24/1984" class="form-control"/>
<script>
    require(['hdjs'], function (hdjs) {
        hdjs.daterangepicker({
            //标签元素
            element: 'input[name="birthdate"]',
            //选项参考插件官网
            options: {},
            callback: function (start, end, label) {
                var str = start.format('YYYY-MM-DD') + ' 至 ' + end.format('YYYY-MM-DD');
                console.log(str);
            }
        });
    })
</script>
</body>
</html>